
#Goal for this example:

#build a dynamic library base
#build a cuda dynamic library that uses the first dynamic library
#build a cpp dynamic library base that uses the cuda dynamic library
#build a cuda executable that uses this last cpp dynamic library
#lastly build a cpp executable that uses this last cpp dynamic library

#this tests that we can link a cuda dynamic library with a dynamic cpp library
#and link cuda/cpp executables with dynamic libraries

add_library(multi_dynamic_base SHARED dynamic.cpp)
add_library(multi_dynamic_cuda SHARED dynamic.cu)
target_link_libraries(multi_dynamic_cuda PUBLIC multi_dynamic_base)

add_library(multi_dynamic_final SHARED dynamic_final.cpp)
target_link_libraries(multi_dynamic_final PUBLIC multi_dynamic_cuda)

add_executable(multi_dynamic_cuda_exe main.cu)
target_link_libraries(multi_dynamic_cuda_exe PRIVATE multi_dynamic_final)

add_executable(multi_dynamic_cpp_exe main.cpp)
target_link_libraries(multi_dynamic_cpp_exe PRIVATE multi_dynamic_final)
